/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package project2analisisnumerico.pruebas;
/**
 *
 * @author Administrador
 */
import org.nfunk.jep.JEP; 
public class pruab {
    static JEP myParser = new JEP();
    public static void main(String[] args) {
        // Set up the parser (more initialization in parseExpression()) 
        myParser = new JEP();
        myParser.initFunTab(); // clear the contents of the function table
        myParser.addStandardFunctions();
        myParser.setTraverse(false);
                
                
        myParser.initSymTab(); // clear the contents of the symbol table
	myParser.addStandardConstants();
	myParser.addComplex(); // among other things adds i to the symbol table
	myParser.addVariable("x", 10);
	myParser.parseExpression("sen(x)");
        if(myParser.getErrorInfo() == null)
            System.out.println(myParser.getValueAsObject().toString());
        else
            System.out.println("hay error");
    }
 
}